package org.jing.ext.socket;

import org.jing.core.lang.annotation.SerializableField;
import org.jing.core.lang.annotation.SerializableType;

/**
 * Description: <br>
 *
 * @author bks <br>
 * @since 2024-07-08 <br>
 */
@SerializableType
public class DefaultSocketServerConfig extends BaseSocketServerConfig {
    @SerializableField(value = "port", defaultValue = "-1")
    private int port;

    @SerializableField(value = "encoding", defaultValue = "utf-8")
    private String encoding;

    @SerializableField(value = "timeout", defaultValue = "60000")
    private long timeout;

    @SerializableField(value = "limit", defaultValue = "12")
    private int limit;

    @Override public int getPort() {
        return port;
    }

    @Override public void setCode(String code) {
    }

    @Override public String getCode() {
        return null;
    }

    @Override public void setName(String name) {
    }

    @Override public String getName() {
        return null;
    }

    @Override public void setPort(int port) {
        this.port = port;
    }

    @Override public String getEncoding() {
        return encoding;
    }

    @Override public void setEncoding(String encoding) {
        this.encoding = encoding;
    }

    @Override public long getTimeout() {
        return timeout;
    }

    @Override public void setTimeout(long timeout) {
        this.timeout = timeout;
    }

    @Override public int getLimit() {
        return limit;
    }

    @Override public void setLimit(int limit) {
        this.limit = limit;
    }

    @Override public void after() {}
}
